package com.forum.framework.security.config;

import com.forum.framework.security.core.rpc.LoginUserRequestInterceptor;
import com.forum.module.system.api.oauth2.OAuth2TokenApi;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * 功能:Security 使用到 Feign 的配置项
 * 作者:ouyzh
 * 日期:2025/3/1 19:59
 */
@AutoConfiguration
@EnableFeignClients(clients = {OAuth2TokenApi.class // 主要是引入相关的 API 服务
})
public class ForumSecurityRpcAuthConfiguration {
    @Bean
    public LoginUserRequestInterceptor loginUserRequestInterceptor() {
        return new LoginUserRequestInterceptor();
    }
}
